home *** CD-ROM | disk | FTP | other *** search
- Path: newsserver.trl.OZ.AU!usenet
- From: davej@apertus.com
- Newsgroups: rec.games.programmer,comp.programming,comp.lang.c++,alt.msdos.programmer
- Subject: Re: Young programmers read me.
- Date: Wed, 17 Apr 96 12:52:08 EDT
- Organization: Telecom Research Laboratories, Melbourne, Australia.
- Message-ID: <4l1n31$636@newsserver.trl.OZ.AU>
- References: <4l0c8p$rvp@fountain.mindlink.net>
- NNTP-Posting-Host: 172.17.4.125
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
-
-
- In article <4l0c8p$rvp@fountain.mindlink.net>, <genew@mindlink.bc.ca> writes:
- > hennebry@plains.nodak.edu (Michael J. Hennebry) wrote:
- > >In article <4kmfqn$e0f@airdmhor.gen.nz>,
- > >Simon Hosie <gumboot@airdmhor.gen.nz> wrote:
- > >> if(something_happened)
- > >> do_something_else();
- >
- > >AAAaaarrrggg! This is an accident waiting to happen.
-
- Agreed.
-
- > Why? If you don't know the language, why program in it?
-
- That's not much of an answer!
-
- > I always indent my code properly (meaning consistently) and if I
- > saw that the then clause needed to be "blockized", I'd do it automatically.
-
- You may "always indent your code properly" but what about when you are
- working on a large project with 6 or 20 other engineers? Have you
- ever worked on a project where you share development code with others?
- What if the company you work for has standards that don't allow your
- method?
-
- IMO, if you're relying on indentation to indicate program flow, you're
- just asking for trouble, and lots of it.
-
- > >Lotsa luck.
- > I don't need luck. I have a method.
-
- What about when you leave the company? Then every bit of code you
- had ever written or were maintaining would be riddled with accidents
- waiting to happen. Think ahead, it's not always what we want to do
- as programmers, but code MUST be written in a fashion that it will be
- easily maintainable by junior level programmers. I don't really like
- that either, being forced to "code down" but it's a fact that code
- will have bugs and must be maintained. Often it's not the sr engineers
- doing that sort of work.
-
- > >or this:
- > > if(something_happened)
- > > { do_something_else(); }
- >
- > Extraneous braces cause pause.
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ???
-
- Dave Johnson
-